import axios from "axios"
import  type{ IParms } from "../type/types"

export default{
    //获取数据
    get(url:string,data:IParms){
        return axios.get(url,{params:data})
    },
    getone(url:string){
        return axios.get(url)
    },
    //提交数据
    post<T>(url:string,body:T){
        return axios.post(url,body)
    },
    put<T>(url:string,body:T){
        return axios.put(url,body)},
    //
    delete(url:string){
        return axios.delete(url)
    }
}